﻿@using System.Globalization
@model SportClubMvc.Model.SportsClubClasses.MemberModel
<div>
    @{
        var gender = ((int)Model.Gender).ToString(CultureInfo.InvariantCulture);
        var skaterClass = Model.SkaterClass;
    }
    @Html.Hidden(gender, gender, new { id = "genderId" })
    @Html.Hidden(skaterClass, skaterClass, new { id = "classId" })
    <div class="control-group">
        <div class="controls">
            <a href="#" class="thumbnail">
                <img src="~/Content/images/200x133.png" alt="">
            </a>
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            @Model.Name
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Født:</label>
        <div class="controls">
            @Model.Birthdate.ToShortDateString()
        </div>
    </div>
    <div class="control-group">
        <label class="control-label"><b>Klasse:</b></label>
        <div class="controls">
            <div class="skateClass">@Model.SkaterClass</div>
            (@Model.Gender)
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><b>Biografi:</b></label>
        <div class="controls">
            @Model.Biography
        </div>
    </div>
    <div class="control-group">
        <label class="control-label"><b>Rekorder:</b></label>
        <div class="controls">
            @*@Html.EditorFor(skater.Records)*@
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            @Ajax.ActionLink("Endre", "Edit", "Skate", new { skaterId = Model.Id }, new AjaxOptions { UpdateTargetId = "modalBody", HttpMethod = "get" }, new { @class = "btn btn-warning btn-small btn-edit", onclick = "editSkater()" })
            @Html.ActionLink("Slett", "Delete", "Skate", new { skaterId = Model.Id }, new { @class = "btn btn-danger btn-small" })
        </div>
    </div>
</div>
